Skip to content

[19.0][FIX] loyalty: incomplete migration#5673

Open
hbrunn wants to merge 1 commit into
OCA:19.0from
hbrunn:19.0-fix-crm
Open

[19.0][FIX] loyalty: incomplete migration#5673
hbrunn wants to merge 1 commit into
OCA:19.0from
hbrunn:19.0-fix-crm

Conversation

@hbrunn

@hbrunn hbrunn commented May 26, 2026

Copy link
Copy Markdown
Member

previous attempt was incomplete and wrong

@hbrunn hbrunn added this to the 19.0 milestone May 26, 2026
@OCA-git-bot OCA-git-bot added mod:openupgrade_scripts Module openupgrade_scripts series:19.0 labels May 26, 2026
@hbrunn hbrunn changed the title [19.0][FIX] crm: incomplete migration [19.0][FIX] loyalty: incomplete migration May 26, 2026
@hbrunn

hbrunn commented May 26, 2026

Copy link
Copy Markdown
Member Author

/ocabot migration loyalty

Depends on :

dnplkndll added a commit to ledoent/OpenUpgrade that referenced this pull request Jun 19, 2026
… card templates

On top of OCA#5673: the standard gift_card/loyalty_card
templates are reset by the non-noupdate module update, but custom
loyalty.card templates referencing the removed object._get_mail_partner()
helper are not, and the 19.0 data-load render aborts on the missing
method before post-migration runs. Rewrite the helper back to its exact
18.0 equivalent (object.partner_id, the recipient) across every stored
template field (lang/partner_to/email_to/body_html) of model
loyalty.card. fix_template_lang runs first so the standard templates'
lang is already NULL and untouched here.
@dnplkndll

Copy link
Copy Markdown
Contributor

@hbrunn is this out of scope like the backfill on dates since would hit a copy only?

hbrunn/OpenUpgrade@19.0-fix-crm...ledoent:OpenUpgrade:19.0-fix-loyalty-suggestion

@hbrunn

hbrunn commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

it's not out of scope, the replacement should however be _mail_get_customer() instead, and the fields to update should come from mail.template#_get_dynamic_field_names. Then I'd rather see this be done in an end-migration script and using the ORM, as speed isn't much of an issue here.

People with custom reports will have to fix them themselves.

You can propose your fix after this one is merged, which will be faster if you actually take part in the review process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants